package com.group3.group3.login.entity;

import com.group3.group3.mybatis.entity.PtMenuEntity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class MenuLevelEntity implements Serializable {
    private String menuId;
    private String menuName;
    private String parentId;
    private String menuUrl;
    private String menuIcon;
    private List<MenuLevelEntity> list= new ArrayList<>();

    public MenuLevelEntity(PtMenuEntity ptMenuEntity){
        menuId = ptMenuEntity.getMenuId();
        menuName = ptMenuEntity.getMenuName();
        parentId = ptMenuEntity.getParentId();
        menuUrl = ptMenuEntity.getMenuUrl();
        menuIcon = ptMenuEntity.getMenuIcon();
    }

    public String getMenuId() {
        return menuId;
    }

    public void setMenuId(String menuId) {
        this.menuId = menuId;
    }

    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getMenuUrl() {
        return menuUrl;
    }

    public void setMenuUrl(String menuUrl) {
        this.menuUrl = menuUrl;
    }

    public String getMenuIcon() {
        return menuIcon;
    }

    public void setMenuIcon(String menuIcon) {
        this.menuIcon = menuIcon;
    }

    public List<MenuLevelEntity> getList() {
        return list;
    }

    public void setList(List<MenuLevelEntity> list) {
        this.list = list;
    }

    public void addList(MenuLevelEntity item) {
        this.list.add(item);
    }

    @Override
    public String toString() {
        return "MenuLevelEntity{" +
                "menuId='" + menuId + '\'' +
                ", menuName='" + menuName + '\'' +
                ", parentId='" + parentId + '\'' +
                ", menuUrl='" + menuUrl + '\'' +
                ", menuIcon='" + menuIcon + '\'' +
                ", list=" + list +
                '}';
    }
}
